package cn.zl.web.dto.device;

import cn.yunbamboos.rest.service.anno.param.ParamType;
import cn.yunbamboos.rest.service.anno.param.enums.Type;
import cn.yunbamboos.rest.service.dto.in.GenericInDTO;
import com.alibaba.fastjson2.JSONObject;
import jakarta.validation.constraints.NotNull;

public class SyncStatusDeviceInDTO extends GenericInDTO {

    @NotNull(message = "设备ID不能为空")
    @ParamType(path = "device_id", type = Type.String, title = "设备ID", required = true)
    private String deviceId;

    @Override
    public void decode(JSONObject json) {
        super.decode(json);
        this.deviceId = this.getString(json, "device_id");
    }

    public @NotNull(message = "设备ID不能为空") String getDeviceId() {
        return deviceId;
    }
}
